An Ú¿ ÚÂÄ¿ ¿ ÚÄÂÂÄ¿ ÚÂÄÄ¿ Ú¿ ÚÂÄÄ¿ ÚÂÄÄ¿ ô ô ³ ³ ô ÃÅÄ Ã´ ÃÅÄ Ã´ ÀÙ ÀÙ ÀÄÙ ÀÙ ÀÁÄÄÙ ÀÁÄÄÙ ÀÁÄÄÙ ÀÁÄÄÙ ÚÂÄÄ¿ ÚÂÄÄ¿ ÚÂÄÄ¿ ÚÄÂÂÄ¿ Ú¿ ¿ ÚÂÄ¿ ÚÂÄ¿ ÚÂÄÄ¿ ÀÁÄ¿ ô ³ ÃÅÄ Ã´ ô ¿ ³ ÚÅÁÄÁ¿ ÃÅÄÁ¿ ÃÅÄ ÀÄÄÁÙ ÀÁÄÄÙ ÀÙ ÀÙ ÀÁÄÁÄÙ ÀÙ Ù ÀÙ Ù ÀÁÄÄÙ ÚÂÄÄ¿ Ú¿ Ú¿ ÚÄÂÂÄ¿ ÚÂÄ¿ ÚÂÄ¿ ÃÅÄ ÀÅÄÅ٠ô ÃÅÄÁ¿ ÚÅÁÄÁ¿ ÀÁÄÄÙ ÀÙ ÀÙ ÀÙ ÀÙ Ù ÀÙ Ù IS/IS2.EXE Filesize Checker *FREEWARE* This program is freeware and may be distributed freely, as long as all files are included. I do retain all copyrights. It may not be disassembled or altered in any way without my expressed written permission. Included Files ============== IS.EXE DOS Executable IS2.EXE OS/2 Executable IS.TXT This file HISTORY.TXT History of changes FILE_ID.DIZ BBS Description file AVEXTRA.TXT Other Intelec Software Programs REGISTER.TXT How to register our shareware NEWKEYS.TXT More info for our shareware programs If all of the above files aren't included in the archive, you have an altered archive and no guarantees will be made about the contents. WHAT IT DOES ============ IS compares a files actual size against a given size, and returns an errorlevel based on that comparison. This allows you to do batch processing based on a file's size. INSTALLATION ============ Extract the files to a directory, preferably one located in your path (place the DOS EXE in your DOS path, and the OS/2 EXE in your OS2 path) That's it! USAGE ===== To use the utility in a BAT/CMD file, the syntax is: IS filename size [-!] filename = path\filename of the file to check the filename MUST come before the size. size = max. size of file before returning bad errorlevel (see errorlevels) size should be given in Kilobytes (1 = 1K) -! = if this optional parameter is given, it turns on debug mode and additional information will be displayed. run the utility with no parameters for a help display. ERRORLEVELS =========== The utility returns one of three possible errorlevels: 0 - File was under the indicated size 1 - File doesn't exist 2 - File was over the indicated size By testing the errorlevel, you can take actions according to it's size (even whether or not it exists). See (Examples) LOGGING ======= All output is sent to Standard Output and may be redirected to a file which can be used to keep a log. See (Examples) EXAMPLES ======== The following are several example batch file command lines and their explanations. Note that errorlevels must be checked it descending order for them to evaluate properly: #1 IS C:\INTELEC.REP 20 IF ERRORLEVEL 2 GOTO TOOBIG Checks whether the file is larger than 20K and jumps to the label TOOBIG if it is. #2 IS C:\SOMEFILE.ZIP 50 IF ERRORLEVEL 2 GOTO LARGE IF ERRORLEVEL 1 GOTO NOTTHERE IF ERRORLEVEL 0 GOTO SMALL Checks whether the file is larger than 50K. If it is, it jumps to the label LARGE. If the file doesn't exist, it jumps to another label. If it isn't, it jumps to a third label. #3 IS C:\FLAGS\ANOTHER.FLG 1 IF ERRORLEVEL 1 NOT ERRORLEVEL 2 GOTO MISSING This example shows a what to test for the existance of a file (though IF EXIST works as well). Notice the stacjed method of using the errorlevel commands to catch a specific errorlevel. #4 IS SOME.ZIP 10 -!>>c:\logs\is.log IF ERRORLEVEL 2 REN SOME.ZIP SOME.BIG This example checks that the file is less than 10K, turns debugging mode on to display additional information, and redirects all output to a file.